/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package java1;

import java.util.ArrayList;
import java.util.HashSet;

/**
 *
 * @author Yu
 */
public class Set3 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
	ArrayList<String> list = new ArrayList<>();
	HashSet<String> set = new HashSet<>();
	list.add("A");
	list.add("B");
	list.add("C");
	list.add("D");

	set.add("A");
	set.add("B");
	set.add("C");
	set.add("D");
	
	for(int i=0 ; i < list.size( ); i++)
	    System.out.println(list.get(i));
	for(String x : set)
	    System.out.println(x);

    }

}
